let btn = document.querySelector("button");
let diaCont = document.querySelector(".dialog");
let dialog = document.querySelector(".content");
let flag = false; //弹窗开关
btn.onclick = function () {
  flag = true;
  diaCont.style.display = "unset";
  changeText();
};
diaCont.onclick = function () {
  this.style.display = "none";
  flag = false;
  changeText();
};
function changeText() {
  btn.innerText = flag ? "on" : "off";
}
